package com.csap.framework.oauth2.server.entity;

import com.csap.framework.annotation.apidoc.Description;
import com.csap.framework.oauth2.server.model.ClientModel;
import com.csap.mybatisplus.annotation.IdType;
import com.csap.mybatisplus.annotation.TableId;
import com.csap.mybatisplus.annotation.TableName;
import com.csap.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 客户端信息
 * </p>
 *
 * @author yangchengfu
 * @dateTime 2021-07-25 23:51:29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "client")
@Description(value = "客户端信息实体类")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ClientEntity extends Model<ClientEntity, ClientModel> {
    /**
     * id
     */
    @TableId(type = IdType.NONE, value = "id")
    private String id;
    /**
     * 客户端标识
     */
    private String clientId;
    /**
     * 客户端秘钥
     */
    private String clientSecret;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 是否可用
     */
    private Integer enabled;
    /**
     * 是否删除
     */
    private Integer del;
    /**
     * 平台ID
     */
    private String platform;
    /**
     * 客户端LOGO
     */
    private String logo;
    /**
     * 根URL
     */
    private String rootUrl;
    /**
     * 描述
     */
    private String descr;
    /**
     * 客户端作用域
     */
    private List<String> scope;
    /**
     * 权限
     */
    private Set<String> permissions;
    /**
     * 允许授权的URL
     */
    private List<String> allowUrl;


}
